sud<template>
  <div id="home">
    <!-- 导航栏 -->
    <Navbar :navbar="navbar"/>
      <router-view @child_func="child_func"></router-view>
    <Tabbar />
  </div>
</template>

<script>
import Navbar from '@/components/Vant/navbar.vue';
// import Swipe from '@/components/swipe.vue';
// import Tab from '@/components/Vant/tab.vue';
import Tabbar from '@/components/Vant/tabbar.vue';

export default {
  name: 'Home',
  // 组件
  components: {
    Navbar, Tabbar,
  },
  data() {
    return {
      child_data: null, // 子组件传过来的数据
      navbar: null,
    };
  },
  // 方法
  methods: {
    // 子组件传过来的 导航栏数据
    child_func(navbar) {
      this.navbar = navbar;
    },
  },
};
</script>

<!--
        // 默认导航栏数据
      /*
      navbar: {
        fixed: true,
        title: {
          text: '首页',
        },
        left: {
          text: '左',
          fun: this.left,
          icon: null,
          icon_size: 18,
          href: null,
          way: false,
        },
        right: {
          text: '右',
          fun: this.right,
          icon: 'setting-o',
          icon_size: 18,
          href: null,
          way: false,
        },
      },
      */
-->
